import App from './App'
import store from './store'

import Vue from 'vue'
Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$adpid = "1111111111";
Vue.prototype.$eventHub = Vue.prototype.$eventHub || new Vue()
Vue.prototype.$apiUrl = 'https://hh.syrcj666.com';
Vue.prototype.$kfUrl = 'https://p.qiao.baidu.com/cps/chat?siteId=XXXXX&userId=XXXXX';
const tui = {
	toast: function(text, duration, success) {
		uni.showToast({
			title: text,
			icon: success ? 'success' : 'none',
			duration: duration || 2000
		})
	},
	constNum: function() {
		const res = uni.getSystemInfoSync();
		return res.platform.toLocaleLowerCase() == "android" ? 300 : 0;
	},
	px:function(num){
		return uni.upx2px(num)+'px';
	},
}

Vue.prototype.tui = tui

//生成二维码的插件 https://ext.dcloud.net.cn/plugin?id=12939
import VueCompositionAPI from '@vue/composition-api'
Vue.use(VueCompositionAPI)

Vue.prototype.$backgroundAudioData = {
	playing: false,
	playTime: 0,
	formatedPlayTime: '00:00:00'
}
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
